package com.kly.chatter.api.application.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.fqgj.common.api.Response;
import com.kly.chatter.api.application.controller.chatter.ChatController;
import com.kly.chatter.api.application.controller.chatter.req.ChatterModelsUnreadMsgReq;
import com.kly.sc.api.application.annos.SignIgnore;
import com.kly.sc.api.application.annos.VisitorAccessible;
import com.kly.sc.api.application.helper.RequestLocalInfo;
import com.kly.user.chatterService.ModelService;
import com.kly.user.dto.chatter.response.ChatterModelsUnreadMsgDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static cn.hutool.core.thread.ThreadUtil.sleep;

@RestController
public class OkController {

    @Autowired
    private ChatController controller;

    @Autowired
    private ModelService modelService;


    @RequestMapping("/ok")
    @SignIgnore
    @VisitorAccessible
    @SentinelResource
    public String test02() {
//        ChatterModelsUnreadMsgReq req = new ChatterModelsUnreadMsgReq().setChatterCode();
//        RequestLocalInfo.putCurrentUser();
        Response<ChatterModelsUnreadMsgDto> chatterModelsUnreadMsgInfo = modelService.getChatterModelsUnreadMsgInfo("297185968153281770");
        return "bbbbb";
    }
}
